package searcher;
/**
 * a class implements comparable and therefore being used in the heap 
 * @author shitgao
 *
 */

public class HeapElem implements Comparable<HeapElem> {
	private int fileNum;
	private int sourceSet;
	
	public HeapElem (int fileNum, int sourceSet){
		this.fileNum=fileNum;
		this.sourceSet=sourceSet;
	}
		
	public	int compareTo(HeapElem that){
		if (this.fileNum<that.fileNum)
			return -1;
		if (this.fileNum>that.fileNum)
			return 1;
		return 0;
	}
	
	public int getFileNum(){
		return fileNum;
	}
	
	public int getsourceSet(){
		return sourceSet;
	}
}
